<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
Copyright: Jason Moffat www.kmdvisual.com
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$document_title?></title>
<link rel="stylesheet" type="text/css" href="<?=base_url()?>assets/website/css/print<?=INSTANCE_FILE_SUFFIX?>.css" media="print" />                    
<link rel="stylesheet" type="text/css" href="<?=base_url()?>assets/website/css/main<?=INSTANCE_FILE_SUFFIX?>.css" media="screen" />                    
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="<?=base_url()?>assets/website/css/ie6_or_less.css" />
<![endif]-->
<script type="text/javascript" src="<?=base_url()?>assets/website/js/IEmarginFix.js"></script>
<script type="text/javascript" src="<?=base_url()?>assets/website/js/common.js"></script>

<style type="text/css">
#myGallery1, #myGallerySet1
{
width: 962px;
height: 325px;
z-index:5;
display: none;
}
</style>

<link rel="stylesheet" href="<?=base_url()?>assets/website/smoothgallery/css/jd.gallery.css" type="text/css" media="screen" />

<script src="<?=base_url()?>assets/website/smoothgallery/js/mootools.v1.11.js" type="text/javascript"></script>

<script type="text/javascript" src="<?=base_url()?>assets/website/smoothgallery/js/jd.gallery.js"></script>
<script type="text/javascript" src="<?=base_url()?>assets/website/smoothgallery/js/jd.gallery.transitions.js"></script>


<script src="<?=base_url()?>assets/website/js/jquery.tools.min.js" type="text/javascript"></script>

<script type="text/javascript">
$.noConflict(); //must use jQuery no-conflict mode to avoid conflicts with mootools.

jQuery(document).ready(function(jQuery) {
	
	// Opens the overlay and loads the data into it	
	// It's declared as a var so it can be called from other scripts
	jQuery.openOverlay = function(_url, _data){
		the_url = _url;
		the_data = _data;
		jQuery("#overlay").overlay({
			expose: '#333',
			close: false,   
			onBeforeLoad: function() {
				var wrap = this.getContent().find(".overlay_container"); 
				wrap.html("");
				jQuery("#overlay").addClass("loading");
				wrap.load(the_url, the_data, function(){
					jQuery("#overlay").removeClass("loading");
				}); 

/*				var wrap = this.getContent().find(".overlay_container"); 
				wrap.html("");
				jQuery("#overlay").addClass("loading");
				jQuery.ajax({
					url: the_url,
					dataType: "html",
					success: function(data){
						jQuery("#overlay").removeClass("loading");
					}
				});
*/
				jQuery("#overlay .cancel").live("click",function(){
					jQuery('#overlay').overlay().close()
					return false;
				});	 	
			}, 
			api: true 
		}).load(); 
		
	}	
	
	// open trigger's href in overlay
	jQuery("a[rel=overlay]").click(function(){
		url = jQuery(this).attr("href");
		jQuery.openOverlay(url);
		return false;
	});	

});	
</script>

<link media="screen" type="text/css" href="<?=base_url()?>assets/website/smoothgallery/css/default.css" rel="stylesheet">

</head>
